/* 
Estilos adicionales para el sistema de apartados de pases
*/

/* Botones de apartado */
.btnaddPaseApartado {
    position: relative;
    overflow: hidden;
}

.btnaddPaseApartado:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btnaddPaseApartado:hover:before {
    left: 100%;
}

/* Badge de apartado disponible */
.badge-apartado-disponible {
    animation: pulse-apartado 2s infinite;
}

@keyframes pulse-apartado {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Card de pase con apartado */
.divPase.apartado-disponible {
    border-left: 4px solid #28a745;
}

/* Resumen de compra */
.resumen-compra {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

/* Indicadores de estado en carrito */
.cart-item-apartado {
    border-left: 3px solid #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
}

.cart-item-completo {
    border-left: 3px solid #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

/* Modal de confirmación de apartado */
.swal2-apartado .swal2-title {
    color: #28a745;
}

/* Tooltip personalizado para apartados */
.tooltip-apartado {
    position: relative;
    cursor: help;
}

.tooltip-apartado:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

.tooltip-apartado:hover::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    z-index: 1000;
}

/* Animación para agregar al carrito */
.btn-add-animation {
    animation: add-to-cart 0.3s ease-out;
}

@keyframes add-to-cart {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

/* Estilos para diferencias de precio */
.precio-completo {
    color: #007bff;
    font-weight: 600;
}

.precio-apartado {
    color: #28a745;
    font-weight: 600;
}

.precio-pendiente {
    color: #ffc107;
    font-weight: 500;
}

/* Responsive para botones duales */
@media (max-width: 768px) {
    .btn-group-vertical .btn {
        font-size: 12px;
        padding: 6px 8px;
    }
    
    .btn-group-vertical {
        min-width: 120px;
    }
}

/* Efectos de hover mejorados */
.btnaddPase:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
    transition: all 0.2s ease;
}

.btnaddPaseApartado:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40,167,69,0.3);
    transition: all 0.2s ease;
}

/* Loading state para botones */
.btn-loading {
    pointer-events: none;
    opacity: 0.6;
}

.btn-loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mejorar visibilidad de badges */
.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-success {
    background-color: #28a745;
    color: #ffffff;
}

/* Estilos para el resumen de apartados en checkout */
.apartado-summary {
    background: linear-gradient(45deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
}

.apartado-summary .icon {
    color: #856404;
}

/* Estilo para detalles de pago pendiente */
.pago-pendiente {
    background-color: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 4px;
    padding: 8px;
    margin-top: 5px;
}

.pago-pendiente .text-warning {
    font-weight: 500;
}

/* Animación para elementos nuevos en carrito */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cart-item-new {
    animation: slideInRight 0.5s ease-out;
}

/* Mejoras para accesibilidad */
.btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.btnaddPaseApartado:focus {
    outline: 2px solid #28a745;
    outline-offset: 2px;
}

/* Indicador de apartado en card */
.apartado-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 5;
}

.apartado-indicator::before {
    content: "A";
}

/* Estilos para las secciones de formularios separados */
.accordion-section .card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.accordion-section .card-header {
    border-bottom: none;
    font-weight: 600;
    padding: 15px 20px;
}

.accordion-section .card-header.bg-success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
}

.accordion-section .card-header.bg-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14) !important;
}

.accordion-section .card-body {
    padding: 20px;
}

/* Estilos para los formularios de pases */
.rowPase {
    background: #f8f9fa;
    border-radius: 8px;
    margin: 15px 10px !important;
    padding: 20px !important;
    border: 1px solid #e9ecef !important;
    transition: all 0.3s ease;
}

.rowPase:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Badges mejorados para formularios */
.rowPase .badge {
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 15px;
}

.rowPase .badge-success {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.rowPase .badge-warning {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    color: #212529;
}

.rowPase .badge-info {
    background: linear-gradient(45deg, #17a2b8, #6f42c1);
    color: white;
}

/* Alertas informativas mejoradas */
.alert-warning.small {
    font-size: 0.875rem;
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.alert-info {
    border-left: 4px solid #17a2b8;
    background: rgba(23, 162, 184, 0.1);
}

/* Mejoras para los campos de formulario */
.rowPase .form-control {
    border-radius: 6px;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.rowPase .form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Separadores visuales */
.accordion-section + .accordion-section {
    margin-top: 30px;
}

/* Responsive para las secciones */
@media (max-width: 768px) {
    .accordion-section .card-header h5 {
        font-size: 1rem;
    }
    
    .accordion-section .card-header small {
        display: block;
        margin-top: 5px;
    }
    
    .rowPase {
        margin: 10px 5px !important;
        padding: 15px !important;
    }
}